﻿using DomenModel;
using System;
using System.Collections.Generic;
using System.Linq.Expressions;

namespace Model.Repositories.Interfaces
{
    public interface IUserCrud : ICrud<User>
    {
        User GetByLogin(string LoginName);
        string GetRoleOfUser(string LoginName);
        User GetByEmail(string email);
        void Delete(string loginName);
        List<User> GetListForPagination(int page, int itemsOnPage, Expression<Func<User, string>> predicate, bool descending);
        List<User> GetListForPaginationWithFilter(int page, int itemsOnPage, Expression<Func<User, bool>> predicateListSelectedField, Expression<Func<User, string>> predicateSortBy, bool descending);
        long GetCountOfUser();
        long GetCountOfUser(Expression<Func<User, bool>> predicate);
        bool CheckHashPassword(string username, string password);
    }
}
